<template>
  <a-card>
    <a-form :model="queryParams" layout="inline" ref="queryParamsRef">
      <div class="flex flex-wrap space-x-4">

        <a-form-item
            label="小区名称"
            name="communityName"

        >
          <a-input
              placeholder="请输入小区名称"
              v-model:value="queryParams.communityName"></a-input>
        </a-form-item>

        <div class="space-x-2">
          <a-button type="primary" @click="communityInfoStore.getCommunityInfoPage(queryParams)">查询</a-button>
          <a-button @click="resetQuery">重置</a-button>
        </div>
      </div>
    </a-form>
  </a-card>
</template>

<script setup>
import {ref} from 'vue';
import {useCommunityInfoStore} from '@/stores/communityInfoStore.js';

const communityInfoStore = useCommunityInfoStore()

const queryParamsRef = ref(null)
const queryParams = ref({
  communityName: '',
})

function resetQuery() {
  queryParamsRef.value.resetFields()
  communityInfoStore.getCommunityInfoPage(queryParams)
}

</script>

<style scoped>

</style>
